package com.torry.edss.integration.feign.eastmoney.response;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @author torry.wang
 */
@Data
@ApiModel("涨停股池响应数据")
public class EMLimitUpPoolResponse {

    @JsonProperty("rc")
    @ApiModelProperty(value = "返回码", example = "0")
    private Integer returnCode;

    @JsonProperty("rt")
    @ApiModelProperty(value = "响应时间（毫秒）", example = "110")
    private Integer responseTime;

    @JsonProperty("svr")
    @ApiModelProperty(value = "服务器标识", example = "183632167")
    private Long serverId;

    @JsonProperty("lt")
    @ApiModelProperty(value = "未知字段（需确认用途）", example = "2")
    private Integer lt;

    @JsonProperty("full")
    @ApiModelProperty(value = "是否全量数据", example = "0")
    private Integer full;

    @ApiModelProperty("涨停股池数据详情")
    private LimitUpStockPoolData data;

    @Data
    @ApiModel("涨停股池数据详情")
    public static class LimitUpStockPoolData {

        @JsonProperty("tc")
        @ApiModelProperty(value = "股票总数", example = "73")
        private Integer totalCount;

        @JsonProperty("qdate")
        @ApiModelProperty(value = "查询日期（YYYYMMDD）", example = "20250430")
        private String date;

        @ApiModelProperty("涨停股票列表")
        private List<LimitUpStock> pool;
    }

    @Data
    @ApiModel("涨停股票信息")
    public static class LimitUpStock {

        @JsonProperty("c")
        @ApiModelProperty(value = "股票代码", example = "000565")
        private String code;

        @JsonProperty("m")
        @ApiModelProperty(value = "市场类型（0-深市，1-沪市）", example = "0")
        private Integer marketType;

        @JsonProperty("n")
        @ApiModelProperty(value = "股票名称", example = "渝三峡Ａ")
        private String name;

        @JsonProperty("p")
        @ApiModelProperty(value = "最新价（单位：厘）", example = "7550")
        private Double price;

        @JsonProperty("zdp")
        @ApiModelProperty(value = "涨跌幅 %", example = "10.058309555053711")
        private Double changePercent;

        @JsonProperty("amount")
        @ApiModelProperty(value = "成交额（单位：元）", example = "921283376")
        private Double amount;

        @JsonProperty("ltsz")
        @ApiModelProperty(value = "流通市值（单位：元）", example = "3273621261.0")
        private Double ltsz;

        @JsonProperty("tshare")
        @ApiModelProperty(value = "总市值（单位：元）", example = "3273621291.2")
        private Double totalMarketValue;

        @JsonProperty("hs")
        @ApiModelProperty(value = "换手率 %", example = "28.690340042114259")
        private Double turnoverRate;

        @JsonProperty("fund")
        @ApiModelProperty(value = "封板资金", example = "65941730")
        private Double sealAmount;

        @JsonProperty("lbc")
        @ApiModelProperty(value = "连板次数", example = "4")
        private Integer lbc;

        @JsonProperty("fbt")
        @ApiModelProperty(value = "首次涨停时间（HHMMSS）", example = "92500")
        private String firstLimitUpTime;

        @JsonProperty("lbt")
        @ApiModelProperty(value = "最后涨停时间（HHMMSS）", example = "144918")
        private String lastLimitUpTime;

        @JsonProperty("zbc")
        @ApiModelProperty(value = "炸板次数", example = "4")
        private Integer zbc;

        @JsonProperty("hybk")
        @ApiModelProperty(value = "所属行业板块", example = "化学制品")
        private String industry;

        @ApiModelProperty("涨停统计")
        @JsonProperty("zttj")
        private LimitUpStats stat;
    }

    @Data
    @ApiModel("涨停统计信息")
    public static class LimitUpStats {

        @JsonProperty("days")
        @ApiModelProperty(value = "涨停天数", example = "4")
        private Integer days;

        @JsonProperty("ct")
        @ApiModelProperty(value = "连板数", example = "4")
        private Integer limitCount;
    }
}
